Embodiments of the present disclosure are directed to an image processing device, an image processing method, and an image processing program.
Digital still cameras frequently make use of dynamic range compression technologies such as high dynamic range (HDR) or backlight compensation. Such imaging devices can compress a range of one or both of a highlight area and a shadow area of an image of a subject for which a brightness range is wider than the dynamic range of an imaging element, to acquire an image.
Furthermore, in an image having a partially compressed brightness range, image processing based on retinex theory can be performed on the image to provide local dynamic range compensation. According to retinex theory, brightness components of an input image are divided into illumination light components and reflectivity components, the illumination light components are modulated, and then the modulated illumination components and the reflectivity components are recombined, to obtain an output image in which dynamic range has been locally compensated.
In addition, a smoothing filter may be applied to the input image to extract the illumination light components. In this case, an unnatural image pattern not present in the original image may form in the vicinity of a boundary between a subject and a background, i.e., a halo phenomenon.